package com.anon.aop;

import org.springframework.aop.AfterReturningAdvice;
import org.springframework.lang.Nullable;

import java.lang.reflect.Method;

/**
 * @author 徒有琴
 */
public class MyAfterAdvice implements AfterReturningAdvice {

    @Override
    public void afterReturning(@Nullable Object target, Method method, Object[] args, @Nullable Object res) throws Throwable {
        System.out.println("提交事务");
        System.out.println("关闭连接");
    }
}
